{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Capacity Price Data\n", "\n", "This notebook walk through how to use `gridstatus` to access to the NYISO latest capacity market report price data." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import gridstatus\n", "import plotly.express as px" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
NYCAGHIJNYCLI
StripMonthlySpotStripMonthlySpotStripMonthlySpotStripMonthlySpot
2022-11-011.181.151.541.311.221.541.661.391.541.181.191.54
2022-10-013.402.942.924.653.213.185.163.213.273.886.406.48
2022-09-013.403.192.954.653.423.125.163.423.213.886.506.43
2022-08-013.403.253.474.653.353.745.163.414.413.886.506.71
2022-07-013.403.223.324.653.403.325.163.553.553.886.016.71
.......................................
2017-09-013.002.092.1810.509.679.9011.719.8510.195.796.556.59
2017-08-013.002.242.1810.509.739.6911.719.909.855.796.686.67
2017-07-013.003.152.2610.509.949.7511.7110.259.865.796.556.69
2017-06-013.002.413.8910.5010.2510.0111.7110.5510.245.796.506.69
2017-05-013.003.151.7210.5010.5010.2811.7111.8310.575.795.756.71
\n", "

67 rows × 12 columns

\n", "
" ], "text/plain": [ " NYCA GHIJ NYC \\\n", " Strip Monthly Spot Strip Monthly Spot Strip Monthly Spot \n", " \n", "2022-11-01 1.18 1.15 1.54 1.31 1.22 1.54 1.66 1.39 1.54 \n", "2022-10-01 3.40 2.94 2.92 4.65 3.21 3.18 5.16 3.21 3.27 \n", "2022-09-01 3.40 3.19 2.95 4.65 3.42 3.12 5.16 3.42 3.21 \n", "2022-08-01 3.40 3.25 3.47 4.65 3.35 3.74 5.16 3.41 4.41 \n", "2022-07-01 3.40 3.22 3.32 4.65 3.40 3.32 5.16 3.55 3.55 \n", "... ... ... ... ... ... ... ... ... ... \n", "2017-09-01 3.00 2.09 2.18 10.50 9.67 9.90 11.71 9.85 10.19 \n", "2017-08-01 3.00 2.24 2.18 10.50 9.73 9.69 11.71 9.90 9.85 \n", "2017-07-01 3.00 3.15 2.26 10.50 9.94 9.75 11.71 10.25 9.86 \n", "2017-06-01 3.00 2.41 3.89 10.50 10.25 10.01 11.71 10.55 10.24 \n", "2017-05-01 3.00 3.15 1.72 10.50 10.50 10.28 11.71 11.83 10.57 \n", "\n", " LI \n", " Strip Monthly Spot \n", " \n", "2022-11-01 1.18 1.19 1.54 \n", "2022-10-01 3.88 6.40 6.48 \n", "2022-09-01 3.88 6.50 6.43 \n", "2022-08-01 3.88 6.50 6.71 \n", "2022-07-01 3.88 6.01 6.71 \n", "... ... ... ... \n", "2017-09-01 5.79 6.55 6.59 \n", "2017-08-01 5.79 6.68 6.67 \n", "2017-07-01 5.79 6.55 6.69 \n", "2017-06-01 5.79 6.50 6.69 \n", "2017-05-01 5.79 5.75 6.71 \n", "\n", "[67 rows x 12 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "iso = gridstatus.NYISO()\n", "df = iso.get_capacity_prices()\n", "df" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
NYCAGHIJNYCLI
2022-11-011.541.541.541.54
2022-10-012.923.183.276.48
2022-09-012.953.123.216.43
2022-08-013.473.744.416.71
2022-07-013.323.323.556.71
...............
2017-09-012.189.9010.196.59
2017-08-012.189.699.856.67
2017-07-012.269.759.866.69
2017-06-013.8910.0110.246.69
2017-05-011.7210.2810.576.71
\n", "

67 rows × 4 columns

\n", "
" ], "text/plain": [ " NYCA GHIJ NYC LI\n", " \n", "2022-11-01 1.54 1.54 1.54 1.54\n", "2022-10-01 2.92 3.18 3.27 6.48\n", "2022-09-01 2.95 3.12 3.21 6.43\n", "2022-08-01 3.47 3.74 4.41 6.71\n", "2022-07-01 3.32 3.32 3.55 6.71\n", "... ... ... ... ...\n", "2017-09-01 2.18 9.90 10.19 6.59\n", "2017-08-01 2.18 9.69 9.85 6.67\n", "2017-07-01 2.26 9.75 9.86 6.69\n", "2017-06-01 3.89 10.01 10.24 6.69\n", "2017-05-01 1.72 10.28 10.57 6.71\n", "\n", "[67 rows x 4 columns]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "spot_prices = df.loc[:, (slice(None), \"Spot\")].droplevel(1, axis='columns') #select just the spot market prices and drop the level 1 so plotly can plot it \n", "spot_prices" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": "2018201920202021202205101520variableNYCAGHIJNYCLINYISO Capaciy Prices (Spot Auction)DateMegawatts (MW)" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = px.line(spot_prices, title=\"NYISO Capaciy Prices (Spot Auction)\")\n", "fig.update_layout(\n", " xaxis_title=\"Date\", yaxis_title=\"Megawatts (MW)\"\n", ")\n", "fig.show(\"svg\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.10.2 64-bit ('isodata')", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.2" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "49f14642123d0cc1afa9fa45716ed5f1e915189c28b01efe02a8b7ec3c0a3fce" } } }, "nbformat": 4, "nbformat_minor": 2 }